from __future__ import print_function
import sys
import os
import numpy as np
import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns
import os
import glob
#matplotlib.rcParams['savefig.dpi'] = 2 * matplotlib.rcParams['savefig.dpi'] # larger image
#matplotlib.rcParams['figure.figsize']= (20.0, 10.0) # larger image
print("Python version:\n{}\n".format(sys.version))
print("matplotlib version: {}".format(matplotlib.__version__))
print("pandas version: {}".format(pd.__version__))
print("numpy version: {}".format(np.__version__))
print("seaborn version: {}".format(sns.__version__))
Python version: 3.7.8 | packaged by conda-forge | (default, Jul 31 2020, 02:25:08) [GCC 7.5.0] matplotlib version: 3.3.3 pandas version: 1.1.4 numpy version: 1.19.4 seaborn version: 0.11.0
root_path = '../2-Run1' # The path to the directory containing the systems
igbs = ['igb1', 'igb2', 'igb5', 'igb7', 'igb8'] # Each of the systems as named in their directory
ffs = ['ff94','ff96','ff98','ff99', 'ff99SB', 'ff99SBildn', 'ff99SBnmr', 'ff03.r1', 'ff14SB', \
'ff14SBonlysc','ff14ipq','fb15','ff15ipq'] # The name of the state directories
filename_pattern = 'helicity.dat' # The glob to match the data files to read
dfs = {} # Mapping of system name to list of state DataFrames
igbff_all = []
for ff in ffs:
#igbff_all = []
for igb in igbs:
direc=igb + '_'+ ff
# For each system and state, grab all the data files that match the glob
file_glob = os.path.join(root_path, direc, filename_pattern)
files = glob.glob(file_glob)
for f in files:
# Read each into a file to be put into a dict
df = pd.read_csv(f, sep=r'\s+', skiprows=1, names=['Frame', 'Fraction helicity'])
df[r'Time ($\mu$s)'] = df['Frame']/10000
df['Helicity (%)'] = df['Fraction helicity']*100*33/31
df['Mouving average']=pd.Series.rolling(df['Helicity (%)'],window=500,center=False).mean()
df['igb'] = igb
df['ff'] = ff
df['ffigb'] = '{0} {1}'.format(ff, igb)
df['igbff'] = '{0} {1}'.format(igb, ff)
igbff_all.append(df)
df_total = pd.concat(igbff_all)
print(df_total.head())
Frame Fraction helicity Time ($\mu$s) Helicity (%) Mouving average \
0 1 0.848 0.0001 90.270968 NaN
1 2 0.758 0.0002 80.690323 NaN
2 3 0.879 0.0003 93.570968 NaN
3 4 0.848 0.0004 90.270968 NaN
4 5 0.879 0.0005 93.570968 NaN
igb ff ffigb igbff
0 igb1 ff94 ff94 igb1 igb1 ff94
1 igb1 ff94 ff94 igb1 igb1 ff94
2 igb1 ff94 ff94 igb1 igb1 ff94
3 igb1 ff94 ff94 igb1 igb1 ff94
4 igb1 ff94 ff94 igb1 igb1 ff94
90.9*33/31
96.76451612903227
sns.set(context='notebook', style='whitegrid', palette='deep', font='sans-serif',\
font_scale=1.6, rc={'grid.linestyle': '--'})
grid = sns.FacetGrid(df_total, col="igbff", col_wrap=13, hue="ff", height=5, aspect=1,\
sharex=True, sharey=True, despine=False, legend_out=False)
# Draw a horizontal line to show the starting point
grid.map(plt.axhline, y=96.76, ls=":", c=".5") # 90.9*33/31
grid.map(plt.plot, r'Time ($\mu$s)', 'Mouving average').set_titles("{col_name}")
grid.map(plt.plot, r'Time ($\mu$s)', 'Helicity (%)', alpha=0.6).set_titles("{col_name}")
# Adjust the tick positions and labels
#grid.set(xticks=np.arange(5), yticks=[-3, 3],
#xlim=(-.5, 4.5), ylim=(-3.5, 3.5))
# Adjust the arrangement of the plots
#grid.fig.tight_layout(w_pad=1)
grid.set(xlim=(0, 6) , ylim=(0, 100))
plt.xlabel(r'time ($\mu$s)')
#plt.ylabel('Percentage helicity (%)')
plt.savefig('./plots/helicity.pdf')
# plt.savefig('./plots/helicity.png', dpi=300)
plt.show()
sns.set(context='notebook', style='whitegrid', palette='deep', font='sans-serif',\
font_scale=1.6, rc={'grid.linestyle': '--'})
grid = sns.FacetGrid(df_total, col="ffigb", col_wrap=5, hue="ffigb", height=5, aspect=1,\
sharex=True, sharey=True, despine=False, legend_out=False)
# Draw a horizontal line to show the starting point
grid.map(plt.axhline, y=96.76, ls=":", c=".5") # 90.9*33/31
grid.map(plt.plot, r'Time ($\mu$s)', 'Mouving average').set_titles("{col_name}")
grid.map(plt.plot, r'Time ($\mu$s)', 'Helicity (%)', alpha=0.6).set_titles("{col_name}")
# Adjust the tick positions and labels
#grid.set(xticks=np.arange(5), yticks=[-3, 3],
#xlim=(-.5, 4.5), ylim=(-3.5, 3.5))
# Adjust the arrangement of the plots
#grid.fig.tight_layout(w_pad=1)
grid.set(xlim=(0, 6) , ylim=(0, 100))
plt.xlabel(r'time ($\mu$s)')
#plt.ylabel('Percentage helicity (%)')
plt.savefig('./plots/helicity2.pdf')
# plt.savefig('./plots/helicity2.png', dpi=300)
plt.show()
df_total
| Frame | Fraction helicity | Time ($\mu$s) | Helicity (%) | Mouving average | igb | ff | igbff | |
|---|---|---|---|---|---|---|---|---|
| 0 | 1 | 0.848 | 0.0001 | 90.270968 | NaN | igb1 | ff94 | ff94 igb1 |
| 1 | 2 | 0.758 | 0.0002 | 80.690323 | NaN | igb1 | ff94 | ff94 igb1 |
| 2 | 3 | 0.879 | 0.0003 | 93.570968 | NaN | igb1 | ff94 | ff94 igb1 |
| 3 | 4 | 0.848 | 0.0004 | 90.270968 | NaN | igb1 | ff94 | ff94 igb1 |
| 4 | 5 | 0.879 | 0.0005 | 93.570968 | NaN | igb1 | ff94 | ff94 igb1 |
| 5 | 6 | 0.758 | 0.0006 | 80.690323 | NaN | igb1 | ff94 | ff94 igb1 |
| 6 | 7 | 0.818 | 0.0007 | 87.077419 | NaN | igb1 | ff94 | ff94 igb1 |
| 7 | 8 | 0.788 | 0.0008 | 83.883871 | NaN | igb1 | ff94 | ff94 igb1 |
| 8 | 9 | 0.848 | 0.0009 | 90.270968 | NaN | igb1 | ff94 | ff94 igb1 |
| 9 | 10 | 0.848 | 0.0010 | 90.270968 | NaN | igb1 | ff94 | ff94 igb1 |
| 10 | 11 | 0.758 | 0.0011 | 80.690323 | NaN | igb1 | ff94 | ff94 igb1 |
| 11 | 12 | 0.697 | 0.0012 | 74.196774 | NaN | igb1 | ff94 | ff94 igb1 |
| 12 | 13 | 0.818 | 0.0013 | 87.077419 | NaN | igb1 | ff94 | ff94 igb1 |
| 13 | 14 | 0.848 | 0.0014 | 90.270968 | NaN | igb1 | ff94 | ff94 igb1 |
| 14 | 15 | 0.788 | 0.0015 | 83.883871 | NaN | igb1 | ff94 | ff94 igb1 |
| 15 | 16 | 0.848 | 0.0016 | 90.270968 | NaN | igb1 | ff94 | ff94 igb1 |
| 16 | 17 | 0.848 | 0.0017 | 90.270968 | NaN | igb1 | ff94 | ff94 igb1 |
| 17 | 18 | 0.818 | 0.0018 | 87.077419 | NaN | igb1 | ff94 | ff94 igb1 |
| 18 | 19 | 0.727 | 0.0019 | 77.390323 | NaN | igb1 | ff94 | ff94 igb1 |
| 19 | 20 | 0.727 | 0.0020 | 77.390323 | NaN | igb1 | ff94 | ff94 igb1 |
| 20 | 21 | 0.697 | 0.0021 | 74.196774 | NaN | igb1 | ff94 | ff94 igb1 |
| 21 | 22 | 0.848 | 0.0022 | 90.270968 | NaN | igb1 | ff94 | ff94 igb1 |
| 22 | 23 | 0.788 | 0.0023 | 83.883871 | NaN | igb1 | ff94 | ff94 igb1 |
| 23 | 24 | 0.818 | 0.0024 | 87.077419 | NaN | igb1 | ff94 | ff94 igb1 |
| 24 | 25 | 0.879 | 0.0025 | 93.570968 | NaN | igb1 | ff94 | ff94 igb1 |
| 25 | 26 | 0.788 | 0.0026 | 83.883871 | NaN | igb1 | ff94 | ff94 igb1 |
| 26 | 27 | 0.818 | 0.0027 | 87.077419 | NaN | igb1 | ff94 | ff94 igb1 |
| 27 | 28 | 0.818 | 0.0028 | 87.077419 | NaN | igb1 | ff94 | ff94 igb1 |
| 28 | 29 | 0.788 | 0.0029 | 83.883871 | NaN | igb1 | ff94 | ff94 igb1 |
| 29 | 30 | 0.879 | 0.0030 | 93.570968 | NaN | igb1 | ff94 | ff94 igb1 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 59970 | 59971 | 0.273 | 5.9971 | 29.061290 | 26.679542 | igb8 | ff15ipq | ff15ipq igb8 |
| 59971 | 59972 | 0.333 | 5.9972 | 35.448387 | 26.679542 | igb8 | ff15ipq | ff15ipq igb8 |
| 59972 | 59973 | 0.121 | 5.9973 | 12.880645 | 26.615032 | igb8 | ff15ipq | ff15ipq igb8 |
| 59973 | 59974 | 0.242 | 5.9974 | 25.761290 | 26.602045 | igb8 | ff15ipq | ff15ipq igb8 |
| 59974 | 59975 | 0.242 | 5.9975 | 25.761290 | 26.576071 | igb8 | ff15ipq | ff15ipq igb8 |
| 59975 | 59976 | 0.242 | 5.9976 | 25.761290 | 26.601832 | igb8 | ff15ipq | ff15ipq igb8 |
| 59976 | 59977 | 0.242 | 5.9977 | 25.761290 | 26.627594 | igb8 | ff15ipq | ff15ipq igb8 |
| 59977 | 59978 | 0.121 | 5.9978 | 12.880645 | 26.601832 | igb8 | ff15ipq | ff15ipq igb8 |
| 59978 | 59979 | 0.242 | 5.9979 | 25.761290 | 26.627594 | igb8 | ff15ipq | ff15ipq igb8 |
| 59979 | 59980 | 0.121 | 5.9980 | 12.880645 | 26.627594 | igb8 | ff15ipq | ff15ipq igb8 |
| 59980 | 59981 | 0.303 | 5.9981 | 32.254839 | 26.666342 | igb8 | ff15ipq | ff15ipq igb8 |
| 59981 | 59982 | 0.424 | 5.9982 | 45.135484 | 26.756613 | igb8 | ff15ipq | ff15ipq igb8 |
| 59982 | 59983 | 0.424 | 5.9983 | 45.135484 | 26.821123 | igb8 | ff15ipq | ff15ipq igb8 |
| 59983 | 59984 | 0.303 | 5.9984 | 32.254839 | 26.840497 | igb8 | ff15ipq | ff15ipq igb8 |
| 59984 | 59985 | 0.455 | 5.9985 | 48.435484 | 26.911606 | igb8 | ff15ipq | ff15ipq igb8 |
| 59985 | 59986 | 0.455 | 5.9986 | 48.435484 | 26.982716 | igb8 | ff15ipq | ff15ipq igb8 |
| 59986 | 59987 | 0.424 | 5.9987 | 45.135484 | 27.027852 | igb8 | ff15ipq | ff15ipq igb8 |
| 59987 | 59988 | 0.273 | 5.9988 | 29.061290 | 27.085974 | igb8 | ff15ipq | ff15ipq igb8 |
| 59988 | 59989 | 0.455 | 5.9989 | 48.435484 | 27.182845 | igb8 | ff15ipq | ff15ipq igb8 |
| 59989 | 59990 | 0.394 | 5.9990 | 41.941935 | 27.240968 | igb8 | ff15ipq | ff15ipq igb8 |
| 59990 | 59991 | 0.242 | 5.9991 | 25.761290 | 27.266729 | igb8 | ff15ipq | ff15ipq igb8 |
| 59991 | 59992 | 0.273 | 5.9992 | 29.061290 | 27.247355 | igb8 | ff15ipq | ff15ipq igb8 |
| 59992 | 59993 | 0.121 | 5.9993 | 12.880645 | 27.195619 | igb8 | ff15ipq | ff15ipq igb8 |
| 59993 | 59994 | 0.121 | 5.9994 | 12.880645 | 27.137497 | igb8 | ff15ipq | ff15ipq igb8 |
| 59994 | 59995 | 0.273 | 5.9995 | 29.061290 | 27.098748 | igb8 | ff15ipq | ff15ipq igb8 |
| 59995 | 59996 | 0.242 | 5.9996 | 25.761290 | 27.079374 | igb8 | ff15ipq | ff15ipq igb8 |
| 59996 | 59997 | 0.152 | 5.9997 | 16.180645 | 27.066600 | igb8 | ff15ipq | ff15ipq igb8 |
| 59997 | 59998 | 0.394 | 5.9998 | 41.941935 | 27.124723 | igb8 | ff15ipq | ff15ipq igb8 |
| 59998 | 59999 | 0.485 | 5.9999 | 51.629032 | 27.176458 | igb8 | ff15ipq | ff15ipq igb8 |
| 59999 | 60000 | 0.424 | 6.0000 | 45.135484 | 27.195832 | igb8 | ff15ipq | ff15ipq igb8 |
3104774 rows × 8 columns
temp=df_total.drop(columns=['Frame', 'Fraction helicity', r'Time ($\mu$s)', 'Mouving average', 'igb','ff' ])
temp
| Helicity (%) | igbff | |
|---|---|---|
| 0 | 90.270968 | ff94 igb1 |
| 1 | 80.690323 | ff94 igb1 |
| 2 | 93.570968 | ff94 igb1 |
| 3 | 90.270968 | ff94 igb1 |
| 4 | 93.570968 | ff94 igb1 |
| 5 | 80.690323 | ff94 igb1 |
| 6 | 87.077419 | ff94 igb1 |
| 7 | 83.883871 | ff94 igb1 |
| 8 | 90.270968 | ff94 igb1 |
| 9 | 90.270968 | ff94 igb1 |
| 10 | 80.690323 | ff94 igb1 |
| 11 | 74.196774 | ff94 igb1 |
| 12 | 87.077419 | ff94 igb1 |
| 13 | 90.270968 | ff94 igb1 |
| 14 | 83.883871 | ff94 igb1 |
| 15 | 90.270968 | ff94 igb1 |
| 16 | 90.270968 | ff94 igb1 |
| 17 | 87.077419 | ff94 igb1 |
| 18 | 77.390323 | ff94 igb1 |
| 19 | 77.390323 | ff94 igb1 |
| 20 | 74.196774 | ff94 igb1 |
| 21 | 90.270968 | ff94 igb1 |
| 22 | 83.883871 | ff94 igb1 |
| 23 | 87.077419 | ff94 igb1 |
| 24 | 93.570968 | ff94 igb1 |
| 25 | 83.883871 | ff94 igb1 |
| 26 | 87.077419 | ff94 igb1 |
| 27 | 87.077419 | ff94 igb1 |
| 28 | 83.883871 | ff94 igb1 |
| 29 | 93.570968 | ff94 igb1 |
| ... | ... | ... |
| 59970 | 29.061290 | ff15ipq igb8 |
| 59971 | 35.448387 | ff15ipq igb8 |
| 59972 | 12.880645 | ff15ipq igb8 |
| 59973 | 25.761290 | ff15ipq igb8 |
| 59974 | 25.761290 | ff15ipq igb8 |
| 59975 | 25.761290 | ff15ipq igb8 |
| 59976 | 25.761290 | ff15ipq igb8 |
| 59977 | 12.880645 | ff15ipq igb8 |
| 59978 | 25.761290 | ff15ipq igb8 |
| 59979 | 12.880645 | ff15ipq igb8 |
| 59980 | 32.254839 | ff15ipq igb8 |
| 59981 | 45.135484 | ff15ipq igb8 |
| 59982 | 45.135484 | ff15ipq igb8 |
| 59983 | 32.254839 | ff15ipq igb8 |
| 59984 | 48.435484 | ff15ipq igb8 |
| 59985 | 48.435484 | ff15ipq igb8 |
| 59986 | 45.135484 | ff15ipq igb8 |
| 59987 | 29.061290 | ff15ipq igb8 |
| 59988 | 48.435484 | ff15ipq igb8 |
| 59989 | 41.941935 | ff15ipq igb8 |
| 59990 | 25.761290 | ff15ipq igb8 |
| 59991 | 29.061290 | ff15ipq igb8 |
| 59992 | 12.880645 | ff15ipq igb8 |
| 59993 | 12.880645 | ff15ipq igb8 |
| 59994 | 29.061290 | ff15ipq igb8 |
| 59995 | 25.761290 | ff15ipq igb8 |
| 59996 | 16.180645 | ff15ipq igb8 |
| 59997 | 41.941935 | ff15ipq igb8 |
| 59998 | 51.629032 | ff15ipq igb8 |
| 59999 | 45.135484 | ff15ipq igb8 |
3104774 rows × 2 columns
grouped=temp.groupby(['igbff'])
grouped
<pandas.core.groupby.generic.DataFrameGroupBy object at 0x7fe8b4dba4e0>
grouped.std()
| Helicity (%) | |
|---|---|
| igbff | |
| fb15 igb1 | 3.059155 |
| fb15 igb2 | 0.784488 |
| fb15 igb5 | 2.249720 |
| fb15 igb8 | 0.460499 |
| ff03.r1 igb1 | 7.873248 |
| ff03.r1 igb2 | 14.943242 |
| ff03.r1 igb5 | 15.562923 |
| ff03.r1 igb8 | 9.305667 |
| ff14SB igb1 | 18.902845 |
| ff14SB igb2 | 17.767110 |
| ff14SB igb5 | 15.807232 |
| ff14SB igb8 | 16.818900 |
| ff14SBonlysc igb1 | 9.518143 |
| ff14SBonlysc igb2 | 16.154871 |
| ff14SBonlysc igb5 | 13.551569 |
| ff14SBonlysc igb8 | 15.059350 |
| ff14ipq igb1 | 11.359988 |
| ff14ipq igb2 | 10.748451 |
| ff14ipq igb5 | 12.991186 |
| ff14ipq igb8 | 18.559135 |
| ff15ipq igb1 | 13.051642 |
| ff15ipq igb2 | 12.870617 |
| ff15ipq igb5 | 10.946475 |
| ff15ipq igb8 | 15.001460 |
| ff94 igb1 | 13.954824 |
| ff94 igb2 | 10.879590 |
| ff94 igb5 | 8.540923 |
| ff94 igb8 | 10.370183 |
| ff96 igb1 | 10.806351 |
| ff96 igb2 | 16.516173 |
| ff96 igb5 | 8.118670 |
| ff96 igb8 | 22.708779 |
| ff98 igb1 | 12.132487 |
| ff98 igb2 | 10.940129 |
| ff98 igb5 | 8.578049 |
| ff98 igb8 | 10.578163 |
| ff99 igb1 | 13.408737 |
| ff99 igb2 | 16.480980 |
| ff99 igb5 | 17.575457 |
| ff99 igb8 | 14.371592 |
| ff99SB igb1 | 13.254608 |
| ff99SB igb2 | 15.918683 |
| ff99SB igb5 | 18.856696 |
| ff99SB igb8 | 16.730622 |
| ff99SBildn igb1 | 15.019689 |
| ff99SBildn igb2 | 16.269780 |
| ff99SBildn igb5 | 17.945899 |
| ff99SBildn igb8 | 16.674803 |
| ff99SBnmr igb1 | 12.085722 |
| ff99SBnmr igb2 | 8.303788 |
| ff99SBnmr igb5 | 6.428906 |
| ff99SBnmr igb8 | 8.301609 |
grouped.mean()
| Helicity (%) | |
|---|---|
| igbff | |
| fb15 igb1 | 0.321392 |
| fb15 igb2 | 0.026015 |
| fb15 igb5 | 0.211177 |
| fb15 igb8 | 0.006447 |
| ff03.r1 igb1 | 83.940136 |
| ff03.r1 igb2 | 68.102338 |
| ff03.r1 igb5 | 70.983365 |
| ff03.r1 igb8 | 79.301810 |
| ff14SB igb1 | 52.776490 |
| ff14SB igb2 | 57.929454 |
| ff14SB igb5 | 67.430016 |
| ff14SB igb8 | 63.073386 |
| ff14SBonlysc igb1 | 30.057411 |
| ff14SBonlysc igb2 | 21.157150 |
| ff14SBonlysc igb5 | 27.908725 |
| ff14SBonlysc igb8 | 25.354438 |
| ff14ipq igb1 | 28.604404 |
| ff14ipq igb2 | 31.218869 |
| ff14ipq igb5 | 13.053727 |
| ff14ipq igb8 | 26.178842 |
| ff15ipq igb1 | 48.139873 |
| ff15ipq igb2 | 13.253098 |
| ff15ipq igb5 | 46.665000 |
| ff15ipq igb8 | 33.839284 |
| ff94 igb1 | 73.499564 |
| ff94 igb2 | 77.528502 |
| ff94 igb5 | 82.448064 |
| ff94 igb8 | 79.843894 |
| ff96 igb1 | 76.846259 |
| ff96 igb2 | 5.348658 |
| ff96 igb5 | 80.626895 |
| ff96 igb8 | 9.163818 |
| ff98 igb1 | 79.081156 |
| ff98 igb2 | 77.457559 |
| ff98 igb5 | 82.326658 |
| ff98 igb8 | 79.582866 |
| ff99 igb1 | 20.381254 |
| ff99 igb2 | 32.484096 |
| ff99 igb5 | 40.658693 |
| ff99 igb8 | 29.912502 |
| ff99SB igb1 | 30.117296 |
| ff99SB igb2 | 20.742663 |
| ff99SB igb5 | 34.185133 |
| ff99SB igb8 | 26.584784 |
| ff99SBildn igb1 | 25.318170 |
| ff99SBildn igb2 | 19.602209 |
| ff99SBildn igb5 | 32.575911 |
| ff99SBildn igb8 | 20.770715 |
| ff99SBnmr igb1 | 78.941021 |
| ff99SBnmr igb2 | 83.385583 |
| ff99SBnmr igb5 | 86.866411 |
| ff99SBnmr igb8 | 82.960079 |
mean = grouped.mean()
errors = grouped.std()
ax=mean.plot(yerr=errors, kind='bar',figsize=(25,10), ylim=(0, 100), legend=False, rot=90 )
ax.set_ylabel('Helicity (%)')
ax.set_xlabel('Implicit solvent / force field combinations')
plt.axhline(y=96.76, ls=":", c=".5" ) # 90.9*33/31
plt.tight_layout()
plt.savefig('./helicity_avg.pdf')
plt.savefig('./helicity_avg.png')
#plt.show()
sns.set(context='paper', style='whitegrid', palette='deep', font='sans-serif',\
font_scale=1.6, rc={'grid.linestyle': '--'})
fig, axes = plt.subplots(figsize=(12, 10))
ax=sns.boxplot(x='igbff', y='Helicity (%)', data=df_total, fliersize=0)
ax.set_xticklabels(ax.get_xticklabels(),rotation=90)
ax.set_ylim([0, 100])
ax.set_xlabel('Implicit solvent / force field combinations')
plt.axhline(y=96.76, ls=":", c=".5" ) # 90.9*33/31
plt.tight_layout()
#plt.savefig('./helicity_boxplot.pdf')
plt.savefig('./helicity_boxplot.png', dpi=600)
grouped.boxplot(by='igbff')
fb15 igb1 AxesSubplot(0.1,0.820213;0.097561x0.0797872) fb15 igb2 AxesSubplot(0.217073,0.820213;0.097561x0.0797872) fb15 igb5 AxesSubplot(0.334146,0.820213;0.097561x0.0797872) fb15 igb8 AxesSubplot(0.45122,0.820213;0.097561x0.0797872) ff03.r1 igb1 AxesSubplot(0.568293,0.820213;0.097561x0.0797872) ff03.r1 igb2 AxesSubplot(0.685366,0.820213;0.097561x0.0797872) ff03.r1 igb5 AxesSubplot(0.802439,0.820213;0.097561x0.0797872) ff03.r1 igb8 AxesSubplot(0.1,0.724468;0.097561x0.0797872) ff14SB igb1 AxesSubplot(0.217073,0.724468;0.097561x0.0797872) ff14SB igb2 AxesSubplot(0.334146,0.724468;0.097561x0.0797872) ff14SB igb5 AxesSubplot(0.45122,0.724468;0.097561x0.0797872) ff14SB igb8 AxesSubplot(0.568293,0.724468;0.097561x0.0797872) ff14SBonlysc igb1 AxesSubplot(0.685366,0.724468;0.097561x0.0797872) ff14SBonlysc igb2 AxesSubplot(0.802439,0.724468;0.097561x0.0797872) ff14SBonlysc igb5 AxesSubplot(0.1,0.628723;0.097561x0.0797872) ff14SBonlysc igb8 AxesSubplot(0.217073,0.628723;0.097561x0.0797872) ff14ipq igb1 AxesSubplot(0.334146,0.628723;0.097561x0.0797872) ff14ipq igb2 AxesSubplot(0.45122,0.628723;0.097561x0.0797872) ff14ipq igb5 AxesSubplot(0.568293,0.628723;0.097561x0.0797872) ff14ipq igb8 AxesSubplot(0.685366,0.628723;0.097561x0.0797872) ff15ipq igb1 AxesSubplot(0.802439,0.628723;0.097561x0.0797872) ff15ipq igb2 AxesSubplot(0.1,0.532979;0.097561x0.0797872) ff15ipq igb5 AxesSubplot(0.217073,0.532979;0.097561x0.0797872) ff15ipq igb8 AxesSubplot(0.334146,0.532979;0.097561x0.0797872) ff94 igb1 AxesSubplot(0.45122,0.532979;0.097561x0.0797872) ff94 igb2 AxesSubplot(0.568293,0.532979;0.097561x0.0797872) ff94 igb5 AxesSubplot(0.685366,0.532979;0.097561x0.0797872) ff94 igb8 AxesSubplot(0.802439,0.532979;0.097561x0.0797872) ff96 igb1 AxesSubplot(0.1,0.437234;0.097561x0.0797872) ff96 igb2 AxesSubplot(0.217073,0.437234;0.097561x0.0797872) ff96 igb5 AxesSubplot(0.334146,0.437234;0.097561x0.0797872) ff96 igb8 AxesSubplot(0.45122,0.437234;0.097561x0.0797872) ff98 igb1 AxesSubplot(0.568293,0.437234;0.097561x0.0797872) ff98 igb2 AxesSubplot(0.685366,0.437234;0.097561x0.0797872) ff98 igb5 AxesSubplot(0.802439,0.437234;0.097561x0.0797872) ff98 igb8 AxesSubplot(0.1,0.341489;0.097561x0.0797872) ff99 igb1 AxesSubplot(0.217073,0.341489;0.097561x0.0797872) ff99 igb2 AxesSubplot(0.334146,0.341489;0.097561x0.0797872) ff99 igb5 AxesSubplot(0.45122,0.341489;0.097561x0.0797872) ff99 igb8 AxesSubplot(0.568293,0.341489;0.097561x0.0797872) ff99SB igb1 AxesSubplot(0.685366,0.341489;0.097561x0.0797872) ff99SB igb2 AxesSubplot(0.802439,0.341489;0.097561x0.0797872) ff99SB igb5 AxesSubplot(0.1,0.245745;0.097561x0.0797872) ff99SB igb8 AxesSubplot(0.217073,0.245745;0.097561x0.0797872) ff99SBildn igb1 AxesSubplot(0.334146,0.245745;0.097561x0.0797872) ff99SBildn igb2 AxesSubplot(0.45122,0.245745;0.097561x0.0797872) ff99SBildn igb5 AxesSubplot(0.568293,0.245745;0.097561x0.0797872) ff99SBildn igb8 AxesSubplot(0.685366,0.245745;0.097561x0.0797872) ff99SBnmr igb1 AxesSubplot(0.802439,0.245745;0.097561x0.0797872) ff99SBnmr igb2 AxesSubplot(0.1,0.15;0.097561x0.0797872) ff99SBnmr igb5 AxesSubplot(0.217073,0.15;0.097561x0.0797872) ff99SBnmr igb8 AxesSubplot(0.334146,0.15;0.097561x0.0797872) dtype: object
avg=mean.rename(columns={'Helicity (%)':'Mean'})
std=errors.rename(columns={'Helicity (%)':'Std'})
df1=pd.concat([avg,std], axis=1)
df1['igbff']=df1.index.astype('str')
df1['Implicit solvent / Force field combination'] = df1['igbff'].astype('str')
df1.dtypes
Mean float64 Std float64 igbff object Implicit solvent / Force field combination object dtype: object
plt.figure()
plt.errorbar(x= y=mean, yerr=errors)
File "<ipython-input-14-1d0f2cff0a76>", line 2 plt.errorbar(x= y=mean, yerr=errors) ^ SyntaxError: invalid syntax
fig, axes = plt.subplots(1)
df1.plot( y='Mean', yerr='Std', ax=axes, kind='bar')
#axes.set(xlim=(3.0, 10.5) , ylim=(0, 1))
#lgd = plt.legend(bbox_to_anchor=(1.05, 1), loc="lower left", borderaxespad=0., labelspacing=0.2)
axes.set_ylabel('Helicity (%)')